import axios from "@/tool/axios";
// 请求路径：rights/:type
export const getrights = (type) => axios.get(`rights/${type}`)
//角色授权
export function editrights(roleId, rids) {
    return axios({
      url: `roles/${roleId}/rights`,
      method: 'post',
      data: { rids },
    })
  }
  // . 删除角色指定权限
  export function deletrights(roleId, rids) {
    return axios({
      url: `roles/${roleId}/rights/${rids}`,
      method: 'delete',
    })
  }  
  // 权限列表
  export const rightsList = (type) => axios.get(`rights/${type}`)